x = float(input())
if x == 0:
    result = 0
else:
    result = 1/(2*x)
print(f"g({x:.3f}) = {result:.3f}")